<template>
	<div class="equipment_main max">
		<my-header :backBtn="true">
			<div slot="title">
				设备管理
			</div>
		</my-header>
		<div class="cont-nof">
			<div class="weui-cells">
				<div class="weui-cell weui-cell_access" v-for="device in deviceList" @click="run(device)">
					<div class="weui-cell__bd tl">
						<p>{{device.deviceName}}</p>
					</div>
					<div class="weui-cell__ft">
            {{device.createTime}}
					</div>
				</div>
			</div>
			</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
			  deviceList:[],
      }
		},
		methods: {
			run(device) {
				this.$router.push({
          path:'/eqCont',
          query:device
        })
			},
      fetchDeviceList(){
			  this.$http.fetchDeviceList().then(resp=>{
			    this.deviceList=resp.data;
        })
      }
		},
    mounted(){
		  this.fetchDeviceList();
    }
	}
</script>

<style>
</style>
